<?php

namespace pam\Form;

/**
 * Description of PolicyFieldset
 *
 * @author Robert Bwana
 */
use Zend\Form\Fieldset;
use pam\Model\PolicyStatement;
use Zend\Stdlib\Hydrator\ClassMethods;

class PolicyStatementFieldset extends Fieldset {

    public function __construct($name = null, $options = array()) {
        parent::__construct($name, $options);
        
        $this->setHydrator(new ClassMethods(FALSE));
        $this->setObject(new PolicyStatement);

        $this->add(array(
            'type' => 'hidden',
            'name' => 'id'
        ));
        
        $this->add(array(
            'type' => 'text',
            'name' => 'issue_title',
            'options' => array(
                'label' => 'Statement'
            )
        ));
        
        
        $this->add(array(
            'type' => 'textarea',
            'name' => 'description',
            'options' => array(
                'label' => 'Description'
            )
        ));

        /*$this->add(array(
           'type' => '\Zend\Form\Element\Collection',
            'name' => 'policies',
            'options' => array(
                'label' => 'The indicators for this policy',
                'count' => 3,
                'should_create_template' => true,
                'allow_add' => true,
                'target_element' => array(
                    'type' => 'pam\Form\IndicatorFieldset',
                )
            )
        ));*/
    }

}
